#!/bin/sh
################################################################################
# game
################################################################################
. /etc/rc.d/functions

start() {
    /usr/bin/logger -s -t minimyth -p "local0.info" "[init.d/game] Starting..."

    if [ "x${MM_GAME_SAVE_ENABLED}" = "xyes" ] ; then
        mm_game_restore
    fi

    /usr/bin/logger -s -t minimyth -p "local0.info" "[init.d/game] Started with return code=0..."

    return 0
}

stop() {
    mm_message_output info "saving selected game configuration files ..."

    if [ "x${MM_GAME_SAVE_ENABLED}" = "xyes" ] ; then
        mm_game_save
    fi
}

case $1 in
    start) start ;;
    stop)  stop  ;;
esac

exit 0
